From 0c57dd653c2877d65c17f38884d3bf3d5c8d082c Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Sun, 20 Nov 2022 00:33:12 -0700 Subject: [PATCH] use structured binding instead of std::tie. --- kml.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kml.cc b/kml.cc index 43a230068..0dd315c3f 100644 --- a/kml.cc +++ b/kml.cc @@ -26,7 +26,7 @@ #include // for strtod #include // for strcmp #include // for optional -#include // for tuple, make_tuple, tie +#include // for tuple, make_tuple #include // for QByteArray #include // for QChar @@ -280,9 +280,7 @@ void KmlFormat::gx_trk_e(xg_string /*args*/, const QXmlStreamAttributes* /*attrs while (!gx_trk_times->isEmpty()) { auto* trkpt = new Waypoint; trkpt->SetCreationTime(gx_trk_times->takeFirst()); - double lat, lon, alt; - int n; - std::tie(n, lat, lon, alt) = gx_trk_coords->takeFirst(); + auto [n, lat, lon, alt] = gx_trk_coords->takeFirst(); // An empty kml:coord element is permitted to indicate missing position data; // the estimated position may be determined using some interpolation method. // However if we get one we will throw away the time as we don't have a location. -- 2.30.2